// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright © 2018-2019 Ariadne Devos
// s2 -- replace many sHT_test_hidden

@ test_self @
expression e;
@@
- sHT_test_hidden(e, e)
+ sHT_nonzero_p(e)

@ test_nonzero @
expression e;
@@
- sHT_test_hidden(e, e != 0)
+ sHT_nonzero_p(e)

@ test_zero @
expression e;
@@
- sHT_test_hidden(e, e == 0)
+ sHT_zero_p(e)

@ test_null @
expression e;
@@
- sHT_test_hidden(e, e == NULL)
+ sHT_null_p(e)

@ test_lt0 @
int e;
@@
- sHT_test_hidden(e, e < 0)
+ sHT_lt0(e)

@ test_ge0 @
expression e;
@@
- sHT_test_hidden(e, e >= 0)
+ !sHT_lt0(e)

@ test_ge1 @
expression e, f;
@@
- sHT_test_hidden(e, e >= f)
+ sHT_ge(e, f)

@ test_ge2 @
expression e, f;
@@
- sHT_test_hidden2(e, f, e >= f)
+ sHT_ge(e, f)

@ test_gt1 @
expression e, f;
@@
- sHT_test_hidden(e, e > f)
+ sHT_gt(e, f)

@ test_gt2 @
expression e, f;
@@
- sHT_test_hidden2(e, f, e > f)
+ sHT_gt(e, f)

@ test_lt1 @
expression e, f != 0;
@@
- sHT_test_hidden(\(e\|f\), e < f)
+ sHT_gt(f, e)

@ test_lt2 @
expression e, f;
@@
- sHT_test_hidden2(e, f, e < f)
+ sHT_gt(f, e)

@ test_and1_not @
expression e, f;
@@
- sHT_test_hidden(e, !(e & f))
+ !sHT_and_any(e, f)

@ test_and2_not @
expression e, f;
@@
- sHT_test_hidden2(e, ..., !(e & f))
+ !sHT_and_any(e, f)

@ test_and1 @
expression e, f;
@@
- sHT_test_hidden(e, e & f)
+ sHT_and_any(e, f)

@ test_and2 @
expression e, f;
@@
- sHT_test_hidden2(e, ..., e & f)
+ sHT_and_any(e, f)

@ has_tests @
@@
 \(sHT_gt\|sHT_ge\|sHT_lt0\|sHT_null_p\|sHT_zero_p\|sHT_nonzero_p\|sHT_and_any\)

@ test_header @
@@
  #include <sHT/test.h>

@ introduce_test_header depends on has_tests && !test_header @
@@
  #include <sHT/compiler.h>
+ #include <sHT/test.h>
